package com.example.prop_logic;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        this.getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    /** Called when the user clicks the TruthTable button */
    public void openTruthTableView(View view) {
        // Open the truth table view.
        Log.d("ourDebug", "Opened Truth Table View");

        // Create the intent to open the truth table.
        Intent intent = new Intent(this, TruthTableViewActivity.class);

        this.startActivity(intent);
    }

    /** Called when the user clicks the Equate button */
    public void openEquateView(View view) {
        // Open the truth table view.
        Log.d("ourDebug", "Opened Equate View");

        // Create the intent to open the truth table.
        Intent intent = new Intent(this, EquateViewActivity.class);

        this.startActivity(intent);
    }

    /** Called when the user clicks the Reduce Expression button */
    public void openReduceExpressionView(View view) {
        // Open the truth table view.
        Log.d("ourDebug", "Opened Reduce Expression View");

        // Create the intent to open the truth table.
        Intent intent = new Intent(this, ReduceExpressionViewActivity.class);

        this.startActivity(intent);
    }

}